package com.qnw.CardGroupManagement;

import java.util.*;
import com.qnw.CardGroupManagement.util.*;

public class Card
{
	//卡片名字
	private String name;
	//卡图绝对路径
	private String path;
	//卡密
	private String id;
	
	private String ot;
	private String ot_16;
	//卡片种类
	private List<String> card_type=new ArrayList<String>();
	private int card_type_16;
	
	//卡片等级
	private String level;
	private String level_16;
	//卡片属性
	private String attribute;
	private String attribute_16;
	//卡片种族
	private String race;
	private String race_16;
	//攻击力
	private String atk;
	private String atk_16;
	//守备力
	private String def;
	private String def_16;
	//卡片效果
	private String desc;
	//脚本提示文字
	private List<String> str=new ArrayList<String>();
	//效果类型
	private List<String> effect_type=new ArrayList<String>();
	private int effect_type_16;
	//同名卡
	private String alias;
	
	private int setcode_16;
	private List<String> setcode=new ArrayList<String>();

	public void setLevel(String level) {
		this.level = level;
		this.level_16=CardMessage.getLevel_16(level);
	}

	public String getLevel() {
		return level;
	}

	public void setAttribute(String attribute) {
		this.attribute = attribute;
		this.attribute_16=CardMessage.getAttribute_16(attribute);
	}

	public String getAttribute() {
		return attribute;
	}

	public void setRace(String race){
		this.race=race;
		race_16=CardMessage.getRace_16(race);
	}
	public String getRace() {
		return race;
	}

	public String getOt() {
		return ot;
	}
	
	public void setDef(String def)
	{
		this.def = def;
		if(def.equals("?")){
			this.def_16="0";
		}else{
			this.def_16=def;
		}
	}

	public String getDef()
	{
		return def;
	}

	public void setAlias(String alias)
	{
		this.alias = alias;
	}

	public String getAlias()
	{
		return alias;
	}

	public void setSetcode(List<String> setcode)
	{
		this.setcode.clear();
		for(String s:setcode){
			this.setcode.add(s);
		}
	}

	public List<String> getSetcode()
	{
		return setcode;
	}

	public void setSetcode_16(int setcode_16)
	{
		this.setcode_16 = setcode_16;
	}

	public int getSetcode_16()
	{
		return setcode_16;
	}
	
	public void setAtk(String atk)
	{
		this.atk = atk;
		if(atk.equals("?")){
			this.atk_16="0";
		}else{
			this.atk_16=atk;
		}
	}

	public String getAtk()
	{
		return atk;
	}

	public void setCard_type(List<String> card_type)
	{
		this.card_type.clear();
		for(String s:card_type){
			this.card_type.add(s);
		}
		
	}

	public List<String> getCard_type()
	{
		return card_type;
	}

	public void setEffect_type(List<String> effect_type)
	{
		this.effect_type.clear();
		for(String s:effect_type){
			this.effect_type.add(s);
		}
	}

	public List<String> getEffect_type()
	{
		return effect_type;
	}

	public void setEffect_type_16(int effect_type_16)
	{
		this.effect_type_16 = effect_type_16;
		setEffect_type( CardMessage.getCardType(effect_type_16));
	}

	public int getEffect_type_16()
	{
		return effect_type_16;
	}

	public void addStr(String s){
		if(str.size()<17){
			str.add(s);
		}
	}
	
	public void setStr(List<String> str)
	{
		this.str.clear();
		for(String ss:str){
			this.str.add(ss);
		}
	}

	public List<String> getStr()
	{
		return str;
	}
	
	public void setDesc(String desc)
	{
		this.desc = desc;
	}

	public String getDesc()
	{
		return desc;
	}

	public void setDef_16(int cardType,String def_16)
	{
		this.def_16 = def_16;
		this.def=CardMessage.getDef(cardType,def_16);
	}

	public String getDef_16()
	{
		return def_16;
	}

	public void setAtk_16(int cardType,String atk_16)
	{
		this.atk_16 = atk_16;
		this.atk=CardMessage.getAtk(cardType,atk_16);
	}

	public String getAtk_16()
	{
		return atk_16;
	}

	public void setRace_16(String race_16)
	{
		this.race_16 = race_16;
		this.race=CardMessage.getRace(race_16);
	}

	public String getRace_16()
	{
		return race_16;
	}

	public void setAttribute_16(String attribute_16)
	{
		this.attribute_16 = attribute_16;
		this.attribute=CardMessage.getAttribute(attribute_16);
	}

	public String getAttribute_16()
	{
		return attribute_16;
	}

	public void setLevel_16(int cardType,String level_16)
	{
		this.level_16 = level_16;
		this.level=CardMessage.getLevel(cardType,level_16);
	}

	public String getLevel_16()
	{
		return level_16;
	}

	public void setCard_type_16(int card_type_16)
	{
		this.card_type_16 = card_type_16;
		setCard_type(CardMessage.getCardType(card_type_16));
	}

	public int getCard_type_16()
	{
		return card_type_16;
	}

	public void setOt_16(String ot_16)
	{
		this.ot_16 = ot_16;
		this.ot=CardMessage.getOT(ot_16);
	}

	public String getOt_16()
	{
		return ot_16;
	}
	
	public void setId(String id)
	{
		this.id = id;
	}

	public String getId()
	{
		return id;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getName()
	{
		return name;
	}

	public void setPath(String path)
	{
		this.path = path;
	}

	public String getPath()
	{
		return path;
	}



	
}
